#include "main.h"
#include "tim.h"
#include "fan.h"
void Fan_Init()
{
    HAL_TIM_PWM_Start(&htim4,TIM_CHANNEL_3);
    Fan_Enable(30);
}

void Fan_Enable(uint8_t Value)//Value:0-100
{
    __HAL_TIM_SET_COMPARE(&htim4,TIM_CHANNEL_3,Value);
}

void Fan_Disable()
{
    __HAL_TIM_SET_COMPARE(&htim4,TIM_CHANNEL_3,0);
}

